<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="进销存成本分析（公司层）" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="companySearch()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="false">
                            <div title="导出" yb-download download-url="" download-param="">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <div class="wrapper-none search-bar-data-picker pull-right">
                        <div class="normal-search clearfix">
                            <label class="control-label"><i>*</i>开始时间：</label>
                            <input type="text" class="form-control date-picker m-r-sm"
                                ng-model="company.condition.startCreateDate" datepicker-popup="yyyy-MM-dd"
                                ng-click="company.switchDataPicker(0)" placeholder="必填"
                                ng-change="checkDate(company.condition, 'startCreateDate', 'endCreateDate')"
                                is-open="company.datePickerFlag[0]" close-text="关闭" readonly>
                            <label class="control-label"><i>*</i>结束时间：</label>
                            <input type="text" class="form-control date-picker m-r-sm"
                                ng-model="company.condition.endCreateDate" datepicker-popup="yyyy-MM-dd"
                                ng-click="company.switchDataPicker(1)" placeholder="必填"
                                ng-change="checkDate(company.condition, 'startCreateDate', 'endCreateDate')"
                                is-open="company.datePickerFlag[1]" close-text="关闭" readonly>
                            <span class="btn btn-primary" ng-click="companySearch()">搜索</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft" style="height:82px;">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="200" rowspan="2" colspan="2"class="text-center" title="代理商名称">代理商名称</th>
                                    <th class="text-center th-check"
                                        ng-repeat="item in tbConf.firstTableCol track by $index"
                                        width="{{item.width}}" colspan="{{item.colSpan}}" title="{{item.name}}">
                                        {{item.name}}
                                    </th>
                                    <th width="120" rowspan="2" class="text-center th-check" title="库存">库存</th>
                                </tr>
                                <tr>
                                    <th ng-repeat="itemCol in tbConf.secondTableCol track by $index"
                                        class="text-center th-check border-top" width="{{itemCol.width}}" title="{{itemCol.name}}">
                                        {{itemCol.name}}
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft" style="top:82px">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody ng-repeat="item in dataList">
                                <tr ng-repeat="itemTemp in item.finanaceAmountList track by $index">
                                    <td width="140" rowspan="2" ng-if="$index==0"
                                        class="text-center spill-dots" title="{{item.agentName}}">
                                        <span>{{item.agentName}}</span>
                                    </td>
                                    <td width="60" class="text-center spill-dots" title="{{itemTemp.statisticType}}">
                                        <span>{{itemTemp.statisticType}}</span>
                                    </td>
                                    <td class="text-center spill-dots"
                                        ng-repeat="itemCol in tbConf.secondTableCol"
                                        width="{{itemCol.width}}">
                                        <span title="{{itemTemp[itemCol.dataField]}}">
                                            {{itemTemp[itemCol.dataField]}}
                                        </span>
                                    </td>
                                    <td width="120" class="text-center spill-dots" title="{{itemTemp.totalAmount}}">
                                        <span>{{itemTemp.totalAmount}}</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" style="top:82px">暂时没有数据
                    </div>
                </div>
            </div>
        </div>
        <div tab heading="进销存成本分析（仓库层）" ng-click="changeTab(1)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="warehouseSearch(1)" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <div class="btn btn-default base-color" ng-if="false">
                            <div title="导出" yb-download download-url="" download-param="">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="仓库描述" ng-model="warehouse.condition.warehouseDesc">
                        <span class="input-group-addon cursor-pointer" ng-click="warehouseSearch(1)">搜索</span>
                    </div>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="仓库编码" ng-model="warehouse.condition.warehouseCode">
                    </div>
                    <div class="wrapper-none search-bar-data-picker pull-right">
                        <div class="normal-search clearfix">
                            <label class="control-label"><i>*</i>开始时间：</label>
                            <input type="text" class="form-control date-picker m-r-sm"
                                ng-model="warehouse.condition.startCreateDate" datepicker-popup="yyyy-MM-dd"
                                ng-click="warehouse.switchDataPicker(0)" placeholder="必填"
                                ng-change="checkDate(warehouse.condition, 'startCreateDate', 'endCreateDate')"
                                is-open="warehouse.datePickerFlag[0]" close-text="关闭" readonly>
                            <label class="control-label"><i>*</i>结束时间：</label>
                            <input type="text" class="form-control date-picker m-r-sm"
                                ng-model="warehouse.condition.endCreateDate" datepicker-popup="yyyy-MM-dd"
                                ng-click="warehouse.switchDataPicker(1)" placeholder="必填"
                                ng-change="checkDate(warehouse.condition, 'startCreateDate', 'endCreateDate')"
                                is-open="warehouse.datePickerFlag[1]" close-text="关闭" readonly>
                        </div>
                    </div>
                </div>
                <div class="main-area">
                    <div yb-table-fixed class="table-fixed-wrap">
                        <div class="th-scroll-x" ng-style="tbStyle.scrollLeft" style="height:82px;">
                            <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                                <thead>
                                    <tr>
                                        <th width="200" rowspan="2" colspan="2"class="text-center" title="仓库名称">仓库名称</th>
                                        <th class="text-center th-check"
                                            ng-repeat="item in tbConf.firstTableCol track by $index"
                                            width="{{item.width}}" colspan="{{item.colSpan}}" title="{{item.name}}">
                                            {{item.name}}
                                        </th>
                                        <th width="120" rowspan="2" class="text-center th-check" title="库存">库存</th>
                                    </tr>
                                    <tr>
                                        <th ng-repeat="itemCol in tbConf.secondTableCol track by $index"
                                            class="text-center th-check border-top" width="{{itemCol.width}}" title="{{itemCol.name}}">
                                            {{itemCol.name}}
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft" style="top:82px">
                            <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                                <tbody ng-repeat="dataItem in dataList">
                                    <tr ng-repeat="itemTemp in dataItem.finanaceAmountList">
                                        <td width="140" rowspan="{{dataItem.finanaceAmountList.length}}" ng-if="$index==0"
                                            class="text-center spill-dots" title="{{warehouseItem.warehouseName}}">
                                            <span>{{dataItem.warehouseName}}</span>
                                        </td>
                                        <td width="60" class="text-center spill-dots" title="{{itemTemp.statisticType}}">
                                            <span>{{itemTemp.statisticType}}</span>
                                        </td>
                                        <td class="text-center spill-dots"
                                            ng-repeat="itemCol in tbConf.secondTableCol"
                                            width="{{itemCol.width}}">
                                            <span title="{{itemTemp[itemCol.dataField]}}">
                                                {{itemTemp[itemCol.dataField]}}
                                            </span>
                                        </td>
                                        <td width="120" class="text-center spill-dots" title="{{itemTemp.totalAmount}}">
                                            <span>{{itemTemp.totalAmount}}</span>
                                        </td>
                                    </tr>
                                </tbody>
                                <tbody ng-repeat="item in warehouse.totalRow">
                                    <tr ng-repeat="itemTemp in item.finanaceAmountList" class="yellow-bg">
                                        <td width="140" rowspan="2" ng-if="$index==0"
                                            class="text-center spill-dots" title="{{item.warehouseName}}">
                                            <span>{{item.warehouseName}}</span>
                                        </td>
                                        <td width="60" class="text-center spill-dots" title="{{itemTemp.statisticType}}">
                                            <span>{{itemTemp.statisticType}}</span>
                                        </td>
                                        <td class="text-center spill-dots"
                                            ng-repeat="itemCol in tbConf.secondTableCol"
                                            width="{{itemCol.width}}">
                                            <span title="{{itemTemp[itemCol.dataField]}}">
                                                {{itemTemp[itemCol.dataField]}}
                                            </span>
                                        </td>
                                        <td width="120" class="text-center spill-dots" title="{{itemTemp.totalAmount}}">
                                            <span>{{itemTemp.totalAmount}}</span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" style="top:82px">暂时没有数据
                        </div>
                    </div>
                </div>
                <div class="bottom-area page-bar wrapper-y-sm clearfix">
                    <div yb-page-info ng-model="warehouse.pageInfo" yb-refresh="warehouseSearch()"></div>
                </div>
            </div>
        </div>
    </div>
</div>